#include <libl.h>
#include "data.h"
#include "comm.h"
#include "rtklib.h"



//Public Variables
#if defined(__GNUC__)    /* GNU GCC Compiler */
__attribute__((section(".ARM.__at_0x08002FF0"))) const u8 sys_upCheck[16];
#else
__attribute__((at(INTFLASH_BASE_ADR + BOOTLOADER_SIZE + 2032))) const u8 sys_upCheck[16];
#endif




int sys_app_config = 0;

//Public Consts




//OS thread declares
os_thd_declare(RTKT, 16000);
os_thd_declare(COMM, 3000);
os_thd_declare(STAT, 1000);


//AISG User Functions
void aisg_rs485_rx()
{

	gpio_Set(0, 0);
}

void aisg_rs485_tx()
{

	gpio_Set(0, 1);
}


void app_Daemon(size_t cnt)
{

	gpio_Set(1, cnt & 1);
}

extern void tsk_RTKT(void *args);
void app_Entry()
{
	
	data_Init();
	os_thd_init(RTKT, OS_THDPRI_LOW);
	os_thd_init(COMM, OS_THDPRI_NORMAL);
	os_thd_init(STAT, OS_THDPRI_NORMAL);
}


int main(void)
{
	sys_Start();
}

